home *** CD-ROM | disk | FTP | other *** search
/ The Mac 13 / the-mac-13.iso / On The Rom / 100 Best Mac CD-ROMs Selection / The Treasure Hunt / SHARED.Dxr / 01000.ls < prev    next >
Encoding:
Text File  |  1994-09-16  |  2.3 KB  |  110 lines

  1. global text, game, chapter, bedtime, base
  2.  
  3. on goback
  4.   global game, bedtime, chapter
  5.   set game to 0
  6.   set bedtime to 0
  7.   set chapter to 0
  8.   set the timeoutScript to EMPTY
  9.   set the volume of sound 1 to 256
  10.   set the volume of sound 2 to 256
  11.   go("main", "THAtitle")
  12. end
  13.  
  14. on pcursor
  15.   set the cursor of sprite 25 to [983, 984]
  16.   set the cursor of sprite 26 to [981, 982]
  17. end
  18.  
  19. on menuhold
  20.   if the clickOn > 40 then
  21.     pass()
  22.   else
  23.     dontPassEvent()
  24.   end if
  25. end
  26.  
  27. on first
  28.   global bedtime, text
  29.   if the soundBusy of 1 then
  30.     go(the frame)
  31.   else
  32.     puppetSound(0)
  33.     if chapter then
  34.       set the volume of sound 1 to 256
  35.       set the volume of sound 2 to 256
  36.       go("story" & text, "THAtitle")
  37.     else
  38.       if bedtime then
  39.         if bedtime = 11 then
  40.           set bedtime to 1
  41.           set the soundLevel to the soundLevel - 1
  42.           go(1, "THBa")
  43.         end if
  44.         set sel to word bedtime of "THCa THDa THEa THFa THGa THH THIa THIc THJ THK THLa THMa"
  45.         set bedtime to bedtime + 1
  46.         go("x" & text, sel)
  47.       end if
  48.     end if
  49.   end if
  50. end
  51.  
  52. on pagey
  53.   global text
  54.   if the mouseH > the locH of sprite the clickOn then
  55.     puppetSound(0)
  56.     if (label("game") = marker(1)) or (char 4 of the movieName = "b") then
  57.       nothing()
  58.     else
  59.       go(marker(1))
  60.     end if
  61.   else
  62.     set l to char 1 to 4 of the movieName
  63.     if (l = "THBa") or (l = "THBab") then
  64.       puppetSound("j0")
  65.       if l = "THBa" then
  66.         go("x" & text)
  67.       else
  68.         go("x" & text, "THBa")
  69.       end if
  70.     else
  71.       nothing()
  72.     end if
  73.     if l = "THEa" then
  74.       puppetSound("j5")
  75.       updateStage()
  76.     else
  77.       if l = "THGa" then
  78.         puppetSound("j9")
  79.         updateStage()
  80.       else
  81.         if l = "THH." then
  82.           puppetSound("j11")
  83.           updateStage()
  84.         else
  85.           if l = "THIa" then
  86.             puppetSound("j12")
  87.             updateStage()
  88.           else
  89.             if l = "THJ." then
  90.               go("x" & text, "THIc")
  91.             else
  92.               if l = "THK." then
  93.                 puppetSound("j16")
  94.                 updateStage()
  95.               else
  96.                 if l = "THLa" then
  97.                   updateStage()
  98.                   puppetSound("j17")
  99.                 end if
  100.               end if
  101.             end if
  102.           end if
  103.         end if
  104.       end if
  105.     end if
  106.     updateStage()
  107.     go("x" & text)
  108.   end if
  109. end
  110.